﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="TinyForum.Domain" namespace="TinyForum.Domain.Model">
  <class name="ContentBase" abstract="true" table="Contents">
    <id name="ID">
      <generator class="identity"/>
    </id>
    <property name="Title" access="field.camelcase" not-null="true"/>
    <property name="Content" access="field.camelcase" not-null="true"/>
    <property name="DateCreated" access="field.camelcase" not-null="true"/>
    <property name="DateModified" access="field.camelcase"/>
    <!--<many-to-one name="UserID" class="User" access="field.camelcase" column="ID" unique="true" not-null="true">
      <column name="UserID" not-null="true"/>
    </many-to-one>-->
    <property name="UserID" access="field.camelcase" not-null="true" />
    <joined-subclass name="Post" table="Posts">
      <key column="ContentID"/>
      <property name="TopicID" access="field.camelcase" not-null="true" />
    </joined-subclass>
    <joined-subclass name="Reply" table="Replies">
      <key column="ContentID"/>
      <property name="PostID" access="field.camelcase" not-null="true" />
    </joined-subclass>
  </class>
</hibernate-mapping>